const log4js = require('log4js');

log4js.configure({
    appenders: { 
        cheese: { type: "file", filename: "logs/cheese.log" },
        access: { type: "file", filename: "logs/access.log" },
        db: { type: "file", filename: "logs/db.log" },
    },
    categories: { 
        default: { appenders: ["cheese"], level: "info" },
        access: { appenders: ["access"], level: "info" },
        db: { appenders: ["db"], level: "info" },
    },
});

module.exports = {
    dbLogger: log4js.getLogger('db')
}